
public class ColumbusMoving extends javax.swing.JPanel {
        protected javax.swing.JButton b1, b2, b3;
        protected javax.swing.JTextField tf1;
        
        public ColumbusMoving() {
            b1 = new javax.swing.JButton("Increment");
            b1.setVerticalTextPosition(javax.swing.AbstractButton.CENTER);
            b1.setHorizontalTextPosition(javax.swing.AbstractButton.LEADING);
            b1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    b1ButtonActionPerformed(evt);
                }
            });            
            b2 = new javax.swing.JButton("Decrement");
            b2.setVerticalTextPosition(javax.swing.AbstractButton.CENTER);
            b2.setHorizontalTextPosition(javax.swing.AbstractButton.LEADING);
            b2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    b2ButtonActionPerformed(evt);
                }
            });  
            tf1 = new javax.swing.JTextField("70");
            add(b1);
            add(b2);
            add(tf1); 
        }
        
        protected void b1ButtonActionPerformed(java.awt.event.ActionEvent evt) {
            int cval = Integer.valueOf(tf1.getText()) + 1;
            tf1.setText(Integer.toString(cval));
            System.out.println(cval);
        }

        protected void b2ButtonActionPerformed(java.awt.event.ActionEvent evt) {
            int cval = Integer.valueOf(tf1.getText()) - 1;
            tf1.setText(Integer.toString(cval));
            System.out.println(cval);            
        }        
        
//}


//public class ColumbusMoving {
    
    private static void createMainFrame() {
            
        javax.swing.JFrame frame = new javax.swing.JFrame("Columbus Moving");
        frame.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
        
        javax.swing.JLabel emptyLabel = new javax.swing.JLabel("123");
        emptyLabel.setPreferredSize(new java.awt.Dimension(800, 600));
        
        ColumbusMoving newContentPane = new ColumbusMoving();
        newContentPane.setOpaque(true);
        frame.setContentPane(newContentPane);
        //frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);        
        frame.pack();
        frame.setVisible(true);       
    }
    
    public static void main(String[] args) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createMainFrame();
            }
        });
    }
}